home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
machack
/
Hacks97
/
WarriorsProgress.sit
/
Warrior’s Progress
/
source code
/
Source
/
Libraries
/
Idle
/
Delayer.h
< prev
next >
Wrap
Text File
|
1997-06-28
|
718b
|
49 lines
// Delayer.h
#ifndef Delayer_h
#define Delayer_h
#ifndef Heap_h
#include "Heap.h"
#endif
#ifndef HeapLink_h
#include "HeapLink.h"
#endif
#ifndef Postponer_h
#include "Postponer.h"
#endif
#ifndef Tick_h
#include "Tick.h"
#endif
class Delayer
{
private:
HeapLink<Delayer> delayLink;
Postponer postponer;
Tick when;
static Heap<Delayer>& Waiting();
public:
Delayer( const Method& );
~Delayer();
bool Pending() const;
void DelayBy( uint32 time );
void DelayTo( Tick );
void Cancel();
void Hasten();
void Flush();
Tick ScheduledTime() const { return when; }
static void ScheduleTasks();
static uint32 SleepTime();
bool Before( const Delayer& ) const;
};
#endif